<?php

namespace app\common\model\order;

use think\Model;


class Goods extends Model
{





    // 表名
    protected $name = 'order_goods';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];










    public function order()
    {
        return $this->belongsTo('app\common\model\Order', 'order_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function goods()
    {
        return $this->belongsTo('app\common\model\Goods', 'goods_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function goods2()
    {
        return $this->belongsTo('app\common\model\Goods', 'goods_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function sku()
    {
        return $this->belongsTo('app\common\model\Sku', 'sku_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }



}
